<%--
  @author Kusal Samarakoon
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>

<link rel='stylesheet' type='text/css' href='${pageContext.request.contextPath}/lib/jquery/fullcalender/fullcalendar.css'/>
<link rel='stylesheet' type='text/css' href='${pageContext.request.contextPath}/lib/jquery/fullcalendar/fullcalendar.print.css' media='print'/>
<script src="${pageContext.request.contextPath}/lib/jquery/fullcalender/fullcalendar.js" type="text/javascript"></script>
<script type='text/javascript' src='${pageContext.request.contextPath}/lib/jquery/fullcalendar/fullcalendar.min.js'></script>

<script type='text/javascript'>

    $(document).ready(function() {

        var date = new Date();
        var d = date.getDate();
        var m = date.getMonth();
        var y = date.getFullYear();

        var calendar = $('#calendar').fullCalendar({
            header: {
                left: 'prev,next today',
                center: 'title',
                right: 'month,agendaWeek,agendaDay'
            },
            selectable: true,
            selectHelper: true,
            select: function(start, end, allDay) {
                var title = prompt('Title:');
                if (title) {
                    calendar.fullCalendar('renderEvent',
                    {
                        title: title,
                        start: start,
                        end: end,
                        allDay: allDay
                    },
                            true // make the event "stick"
                            );
                }
                calendar.fullCalendar('unselect');
            },
            editable: true,
            events: [

            ]
        });

    });

</script>


<div id="calender-module-add" class="form-outer">

    <h2><s:label value="%{getText('calender_schedule_add_title_en.label')}"/> <s:label
            value="%{getText(calender_schedule_add_title_en.label')}"/></h2>


    <div id='calendar'>
    </div>


</div>